﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using mitasoft.Component.Models;
using mitasoft.Component.Dapper;
using System.Data.SqlClient;

namespace mitasoft.Component.Services
{
    public class BaseService
    {
        private const string ConnectionString = @"Data Source=.;Initial Catalog=pwp;Integrated Security=True";

        private SqlConnection _connection;
        public SqlConnection Connection
        {
            get
            {
                if (_connection == null)
                {
                    _connection = new SqlConnection(ConnectionString);
                    _connection.Open();
                }

                return _connection;
            }
        }
    }
}
